import React from 'react';
import {asyncComponent} from './uicomponents/AsyncComponent';

function getPageComponent(owner, props,PageCom) {
    return <PageCom {...props} currentModule={props.location.state} parent={owner}/>
}

const pageRouteMap = {
    //用户设置
    '/UserProfile': {

        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./UserProfile')));
        }
    },
    //系统帐号管理
    '/sys/sysAccountListPanel': {

        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./sys/SysAccountListPanel')));
        }
    },
     //系统应用域管理
    '/sys/sysDomainListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./sys/SysDomainListPanel')));
        }
    },
    //系统组织架构管理
    '/sys/sysDepartmentListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./sys/SysDepartmentListPanel')));
        }
    },
    //系统角色管理
    '/sys/sysRoleListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./sys/SysRoleListPanel')));
        }
    },
    //系统角色组管理
    '/sys/sysRoleGroupListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./sys/SysRoleGroupListPanel')));
        }
    },
    //系统模块管理
    '/sys/sysModuleListPanel': {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./sys/SysModuleListPanel')));
        }
    },
    //系统配置管理
    '/sys/sysConfigListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./sys/SysConfigListPanel')));
        }
    },
    //产品模型域管理
    '/product/model/productModelDomainListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/model/ProductModelDomainListPanel')));
        }
    },
    //产品模型包管理
    '/product/model/productModelPackageListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/model/ProductModelPackageListPanel')));
        }
    },
    //产品数据库管理
    '/product/model/productDatabaseListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/model/ProductDatabaseListPanel')));
        }
    },
    //产品数据类型管理
    '/product/model/productModelDataTypeListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/model/ProductModelDataTypeListPanel')));
        }
    },
    //产品数据类型映射管理
    '/product/model/productDataTypeMapListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/model/ProductDataTypeMapListPanel')));
        }
    },
    //产品模型管理
    '/product/model/productModelObjectListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/model/ProductModelObjectListPanel')));
        }
    },
    //产品模型代码模板管理
    '/product/model/ProductModelCodeTemplateListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/model/ProductModelCodeTemplateListPanel')));
        }
    },
    //产品模型服务模板管理
    '/product/model/ProductModelServiceTemplateListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/model/ProductModelServiceTemplateListPanel')));
        }
    },
    //工程管理
    '/workspace/WorkspaceListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./workspace/WorkspaceListPanel')));
        }
    },
    //产品UI域管理
    '/product/ui/ProductUIDomainListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/ui/ProductUIDomainListPanel')));
        }
    },
    //产品UI图标管理
    '/product/ui/ProductUIImageListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/ui/ProductUIImageListPanel')));
        }
    },
    //产品UI动作管理
    '/product/ui/ProductUIActionListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/ui/ProductUIActionListPanel')));
        }
    },
  //产品UI列表管理
  '/product/ui/ProductUIListDataListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/ui/ProductUIListDataListPanel')));
        }
    },
    //产品UI表单管理
  '/product/ui/ProductUIFormListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/ui/ProductUIFormListPanel')));
        }
    },
    //产品UI表格管理
  '/product/ui/ProductUITableListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/ui/ProductUITableListPanel')));
        }
    }, 
    //产品UI标签页管理
  '/product/ui/ProductUITabListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/ui/ProductUITabListPanel')));
        }
    }, 
     //产品UI树管理
    '/product/ui/ProductUITreeListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/ui/ProductUITreeListPanel')));
        }
    },
     //产品UI页面模板管理
     '/product/ui/ProductUIPageTemplateListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/ui/ProductUIPageTemplateListPanel')));
        }
    }, 
     //产品UI页面管理
     '/product/ui/ProductUIPageListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/ui/ProductUIPageListPanel')));
        }
    },
    //产品管理
    '/product/req/ProductDefineListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/req/ProductDefineListPanel')));
        }
    },
    //产品术语管理
    '/product/req/ProductGlossaryListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/req/ProductGlossaryListPanel')));
        }
    },
     //产品需求管理
     '/product/req/ProductRequirementListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./product/req/ProductRequirementListPanel')));
        }
    },
    '/bpmn/BPMNEditorPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./bpmn/BPMNEditorPanel')));
        }
    },
    //课程管理
    '/education/eduAdminCenter/courseListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./education/eduAdminCenter/CourseDefineListPanel')));
        }
    },
    '/education/eduAdminCenter/campusListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./education/eduAdminCenter/CampusListPanel')));
        }
    },
    '/education/eduAdminCenter/classroomListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./education/eduAdminCenter/ClassroomListPanel')));
        }
    },
    '/education/eduAdminCenter/teacherListPanel' : {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./education/eduAdminCenter/TeacherListPanel')));
        }
    },
    '/education/eduAdminCenter/classDefienListPanel': {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./education/eduAdminCenter/ClassDefineListPanel')));
        }
    },
    '/education/eduAdminCenter/studentListPanel': {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./education/eduAdminCenter/StudentListPanel')));
        }
    },
    //COE管理平台
    '/coe/BusinessUnitManagePanel': {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./coe/BusinessUnitManagePanel')));
        }
    },
    '/coe/BusinessProcessManagePanel': {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./coe/BusinessProcessManagePanel')));
        }
    },
    '/coe/BusinessHandlePanel': {
        getComponent: (owner, props) => {
            return getPageComponent(owner, props,asyncComponent(() => import('./coe/BusinessHandlePanel')));
        }
    },
};

export default pageRouteMap;